﻿
Partial Class Hosteria_VS_BuscarReserva
    Inherits System.Web.UI.Page

    Private Property dbResult As String
    Private Property strSelectComun As String = "SELECT Habitacion.Numero, TipoHabitacion.Descripcion, Reservas.ANombreDe, Reservas.Desde, Reservas.Hasta, Reservas.Id FROM Habitacion INNER JOIN Reservas ON Habitacion.Numero = Reservas.IdHabitacion INNER JOIN TipoHabitacion ON Habitacion.Categoria = TipoHabitacion.Id"
    Private Property strSelectNombre As String = " WHERE (Reservas.ANombreDe > @pepe)"

    Protected Sub lbBuscar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbBuscar.Click
        sdaListaReservas.SelectCommand = strSelectComun + strSelectNombre
        sdaListaReservas.SelectParameters("pNombre").DefaultValue = txtNombre.Text
        sdaListaReservas.Select(DataSourceSelectArguments.Empty)

        '    If txtNombre.Text <> "" Then
        '        If txtDesde.Text <> "" Then
        '            If txtHasta.Text <> "" Then
        '                sdaListaReservas.SelectCommand = 
        '            Else
        '            End If
        '        Else
        '            If txtHasta.Text <> "" Then
        '            Else
        '            End If
        '        End If
        '    Else
        '        If txtDesde.Text <> "" Then
        '            If txtHasta.Text <> "" Then
        '            Else
        '            End If
        '        Else
        '            If txtHasta.Text <> "" Then
        '            Else
        '            End If
        '        End If
        '    End If
    End Sub
End Class
